Deploy the Cobra Web Service Host

The Cobra Web Service host must be configured and deployed on the machine where Cobra is installed.

Since the Cobra Web Service runs through the network, it is required to allow the machine that hosts the web service to listen to the applications from remote machines. By default, the host listens to port 8116 using the Transmission Control Protocol (TCP).

To configure and deploy the Cobra Web Service host:

  1. Locate the Cobra.WebService.Host.exe.config file that resides on the Cobra folder and open it using a text editor (such as Notepad).
  2. Find the two lines:
    <add baseAddress="http://localhost:8116/CobraWebService" />
    <add baseAddress="https://localhost:8122/CobraWebService" />
  3. Replace localhost on both lines with the name of the machine. For example:
    <add baseAddress="http:// COBWSHOST:8116/CobraWebService" />
    <add baseAddress="https:// COBWSHOST:8122/CobraWebService" />
    Note: If you are hosting multiple instances of the Cobra Web Service, you can use this as your first instance. In that case, Deltek recommends using a unique service name and/or description to provide identity to the first instance.
  4. If you plan to host multiple instances of the Cobra Web Service, find the following lines:
    <!--<appSettings>
    <add key="ServiceName" value="Cobra Web Service 1"/>
    <add key="ServiceDescription" value="The first Cobra Web Service instance."/>
    </appSettings>-->
  5. Replace ServiceName and ServiceDescription with unique values.
  6. Remove the comment tags (<! and -->).
  7. Save and close the configuration file.
  8. Launch the Command Prompt, and select Run as administrator.
  9. On the Administrator Command Prompt window, enter the following lines:

    "<Cobra Folder Path>\Cobra.WebService.Host.exe" -install

    The command deploys the host into the Windows Services.

  10. Close the Administrator Command Prompt window.
  11. Check whether the host is running in the Windows Services. Browse the address from the configuration file in an internet browser.
    If the host is running, the page displays that you have created a service and provides details on how to test the service. If a page is not displayed, the host is either not configured correctly or is not running in the Windows Services.
    If you are using Windows authentication, see Configure the Cobra Web Service When Using Windows Authentication . If you want to configure the Cobra Web Service ClientAPI in your application, see Deploy the Cobra Web Service ClientAPI .